# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=geoclue
pkgver=2.5.6
pkgrel=1
pkgdesc="dbus geolocation service"
url="https://www.freedesktop.org/wiki/Software/GeoClue/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="
	meson
	libsoup-dev
	json-glib-dev
	modemmanager-dev
	avahi-dev
	intltool
	gobject-introspection-dev
	libnotify-dev
	"
subpackages="$pkgname-dev $pkgname-doc"
install="$pkgname.pre-install"
source="https://gitlab.freedesktop.org/geoclue/geoclue/-/archive/$pkgver/geoclue-$pkgver.tar.bz2"

build() {
	meson \
		--buildtype=plain \
		--prefix=/usr \
		-Ddbus-srv-user=geoclue \
		-Ddbus-sys-dir=/usr/share/dbus-1/system.d \
		-Dgtk-doc=false \
		-Dintrospection=true \
		build
	ninja -C build
}

check() {
	ninja -C build test
}

package() {
	DESTDIR="$pkgdir" ninja -C build install
}

sha512sums="d05160c95b80f05211d22de2631faf16d7263028c2eaf36a2cabf4d942e3db1d6157cd7feb7980ea358d208d5a24da181a3082488d9afcd126e2eecce5f4e78b  geoclue-2.5.6.tar.bz2"
